#include<stdio.h>
#define maxn 19
int chessboard[maxn][maxn];
int main()
{
    for(int i=0;i<maxn;i++)
    {
        for(int j=0;j<maxn;j++)
            scanf("%d", &chessboard[i][j]);
    }
    int flag, I, J;
    flag = I = J = 0;
    for(int i=0;i<maxn;i++)
    {
        for(int j=0;j<maxn;j++)
        {
            if(!flag && chessboard[i][j] != 0)
            {
                int k, x = chessboard[i][j];
                if(!flag && j <= 15)
                {
                    for(k=1;k<=3;k++)
                    {
                        if(chessboard[i][j+k] != x) break;
                    }
                    if(k == 4 && (chessboard[i][j-1] == 0 || chessboard[i][j+4] == 0))//越界？
                    {
                        flag = 1;
                        I = i, J = j;
                    }
                    if(!flag && i <= 15)
                    {
                        for(k=1;k<=3;k++)
                        {
                            if(chessboard[i+k][j+k] != x) break;
                        }
                        if(k == 4 && (chessboard[i-1][j-1] == 0 || chessboard[i+4][j+4] == 0))
                        {
                            flag = 1;
                            I = i, J = j;
                        }
                    }
                }
                if(!flag && i <= 15)
                {
                    for(k=1;k<=3;k++)
                    {
                        if(chessboard[i+k][j] != x) break;
                    }
                    if(k == 4 && (chessboard[i-1][j] == 0 || chessboard[i+4][j] == 0))
                    {
                        flag = 1;
                        I = i, J = j;
                    }
                    if(!flag && j >= 3)
                    {
                        for(k=1;k<=3;k++)
                        {
                            if(chessboard[i+k][j-k] != x) break;
                        }
                        if(k == 4 && (chessboard[i-1][j+1] == 0 || chessboard[i+4][j-4] == 0))
                        {
                            flag = 1;
                            I = i, J = j;
                        }                                                
                    }
                }
            }
        }
    }
    if(!flag)
        printf("No\n");
    else
    {
        printf("%d:%d,%d\n", chessboard[I][J], I+1, J+1);
    }
    return 0;
}